﻿using InseSoft.Models;
using InseSoft.Services;
using InseSoft.ViewModels;
using InseSoft.ViewModels.Events;
using Ninject.Modules;

namespace InseSoft.Infraestructure
{
    public class MyNinjectModule: NinjectModule
    {
        public override void Load()
        {
            Bind<ICatalogSearchViewModel>().To<CatalogSearchViewModel>();
            Bind<IEventPublisher>().To<EventPublisher>().InSingletonScope();
            Bind<IInseContext>().To<InseContext>();
            Bind<IDialogService>().To<ModalDialogService>();
            Bind<ApplicationSession>().ToSelf().InSingletonScope();

            Bind<MainViewModel>().ToSelf();
            Bind<LoginViewModel>().ToSelf();
            Bind<IWindowLauncher>().To<WindowLauncher>();
        }
    }
}